-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.16] Enables Podman and Docker Windows quarkus-container-image-docker testing #31491
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
This comment has been minimized.
This comment has been minimized.
I am on the results, gonna refactor. |
This comment has been minimized.
This comment has been minimized.
@Karm Not sure what to do with this PR. It doesn't seem like an obvious change given how CI reacted and I'm not sure I want to backport something risky to 2.16. |
Enables enforcing podman on systems where both podman and docker are available
e.g. Before: ``` WARN [io.qua.run.uti.ContainerRuntimeUtil] (main) Command "docker" exited with error code 1. Rootless container runtime detection might not be reliable. ``` after: ``` WARN [io.qua.run.uti.ContainerRuntimeUtil] (main) Command "docker info" exited with error code 1. Rootless container runtime detection might not be reliable or the container service is not running at all. ``` plus with `-Dquarkus.log.level=DEBUG` it logs: ``` DEBUG [io.qua.run.uti.ContainerRuntimeUtil] (main) Command "docker info" output: Client: Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.10.2 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.16.0 Path: /usr/libexec/docker/cli-plugins/docker-compose scan: Docker Scan (Docker Inc.) Version: v0.23.0 Path: /usr/libexec/docker/cli-plugins/docker-scan Server: ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? ```
Failing Jobs - Building c6b4412
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
⚙️ JVM Tests - JDK 11 #- Failing: integration-tests/container-image/maven-invoker-way
📦 integration-tests/container-image/maven-invoker-way✖ ⚙️ JVM Tests - JDK 11 Windows #- Failing: extensions/reactive-routes/deployment
! Skipped: extensions/agroal/deployment extensions/avro/deployment extensions/csrf-reactive/deployment and 227 more 📦 extensions/reactive-routes/deployment✖
|
Included in #32132 with the other commits. Thanks! |
This is a backport of #31490 (Quarkus 2.16 test runs below)
This PR addresses problems I experienced trying to run
quarkus-container-image-docker
driven tests on Windows with Podman for Windows and with Docker Desktop for Windows.I used the changes to Quarkus 2.16 branch to integrate Quarkus PrimeFaces test run that uses a builder image to compile a Linux native executable and then builds a runtime image and runs it for tests. It enables people who work with Windows to test the native workflow despite the fact we do not support Windows MSVC toolchain with e.g. AWT dependency.
Notes
quarkus.docker.executable-name
andquarkus.native.container-runtime
, the former actually comes fromthe quarkus-container-image-docker and the latter from the core. It is used instead of the hardcoded "docker"
Caused by: java.nio.file.FileSystemException: target\quarkus.log: The process cannot access the file because it is being used by another process
is now wrapped in a try block with a logged warning.
Logs from the container: The former logic did not work for me on Windows, the log was left in the container
and there was nothing to pipe to a file. Was it formerly used with mounting the volume? I added
-i
so as the containerpours the log to stdout and capture that. WDYT @geoand 🤔?
Added quarkus-container-image-docker based test to the AWT extension test to try these changes.
Testing
I used the AWT integration test like this to test Podman and Docker on Linux and Windows:
(with
docker
in docker variants)Logs for Quarkus 2.16: